﻿using System;
using Dos.ORM;

namespace Dos.Model
{
    /// <summary>
    /// 实体类search_keyword。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Table("search_keyword")]
    [Serializable]
    public partial class search_keyword : Entity
    {
        #region Model
        private int _id;
        private string _keywords;
        private string _url;
        private int _active;
        private int? _orderBy;
        private string _spell;

        /// <summary>
        /// 
        /// </summary>
        [Field("id")]
        public int id
        {
            get { return _id; }
            set
            {
                this.OnPropertyValueChange("id");
                this._id = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("keywords")]
        public string keywords
        {
            get { return _keywords; }
            set
            {
                this.OnPropertyValueChange("keywords");
                this._keywords = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("url")]
        public string url
        {
            get { return _url; }
            set
            {
                this.OnPropertyValueChange("url");
                this._url = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("active")]
        public int active
        {
            get { return _active; }
            set
            {
                this.OnPropertyValueChange("active");
                this._active = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("orderBy")]
        public int? orderBy
        {
            get { return _orderBy; }
            set
            {
                this.OnPropertyValueChange("orderBy");
                this._orderBy = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("spell")]
        public string spell
        {
            get { return _spell; }
            set
            {
                this.OnPropertyValueChange("spell");
                this._spell = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
                _.id,
            };
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
                _.id,
                _.keywords,
                _.url,
                _.active,
                _.orderBy,
                _.spell,
            };
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
                this._id,
                this._keywords,
                this._url,
                this._active,
                this._orderBy,
                this._spell,
            };
        }
        /// <summary>
        /// 是否是v1.10.5.6及以上版本实体。
        /// </summary>
        /// <returns></returns>
        public override bool V1_10_5_6_Plus()
        {
            return true;
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "search_keyword");
            /// <summary>
			/// 
			/// </summary>
			public readonly static Field id = new Field("id", "search_keyword", "");
            /// <summary>
			/// 
			/// </summary>
			public readonly static Field keywords = new Field("keywords", "search_keyword", "");
            /// <summary>
			/// 
			/// </summary>
			public readonly static Field url = new Field("url", "search_keyword", "");
            /// <summary>
			/// 
			/// </summary>
			public readonly static Field active = new Field("active", "search_keyword", "");
            /// <summary>
			/// 
			/// </summary>
			public readonly static Field orderBy = new Field("orderBy", "search_keyword", "");
            /// <summary>
			/// 
			/// </summary>
			public readonly static Field spell = new Field("spell", "search_keyword", "");
        }
        #endregion
    }
}